home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / util2 / srdsk203.zip / SRDISK.DOC < prev    next >
Text File  |  1993-04-22  |  35KB  |  887 lines

  1.  
  2.                               SRDISK (TM)
  3.                     ReSizeable RAMDisk version 2.03
  4.                          for XMS and EMS memory
  5.  
  6.                  Copyright (c) 1991-1993 Marko Kohtala
  7.                           All rights reserved
  8.  
  9.  
  10.  
  11. CONTENTS
  12.  
  13.   1. Disclaimer of warranty
  14.   2. License
  15.   3. Features included
  16.   4. Files in this release
  17.   5. Usage
  18.   5.1. Basic installation
  19.   5.2. SRDISK device driver
  20.   5.2.1. XMS memory device driver
  21.   5.2.2. EMS memory device driver
  22.   5.2.3. EMS 3.2 memory device driver
  23.   5.3. SRDUMMY device driver
  24.   5.4. SRDISK program
  25.   5.4.1 SRDISK sample commands
  26.   5.4.2 SRDISK command line options
  27.   6. Troubleshooting
  28.   7. Trademarks
  29.   8. Last words
  30.  
  31.  
  32.  
  33.                        1. DISCLAIMER OF WARRANTY
  34.  
  35. THIS SOFTWARE AND MANUAL ARE PROVIDED "AS IS" AND WITHOUT WARRANTIES AS 
  36. TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER 
  37. EXPRESSED OR IMPLIED.  BECAUSE OF THE VARIOUS HARDWARE AND SOFTWARE 
  38. ENVIRONMENTS IN WHICH THIS PROGRAM MAY BE USED, NO WARRANTY OF FITNESS 
  39. FOR A PARTICULAR PURPOSE IS OFFERED.
  40.  
  41. GOOD DATA PROCESSING PROCEDURE DICTATES THAT ANY PROGRAM BE THOROUGHLY
  42. TESTED WITH NON-CRITICAL DATA BEFORE RELYING ON IT.  THE USER MUST
  43. ASSUME THE ENTIRE RISK OF USING THE PROGRAM.  ANY LIABILITY OF THE
  44. SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF
  45. PURCHASE PRICE.
  46.  
  47.  
  48.  
  49.                                2. LICENSE
  50.  
  51. This software is NOT public domain. It is copyrighted software
  52. distributed as shareware.
  53.  
  54. This software is NOT free. A license fee must be paid if used longer 
  55. than for one month evaluation period. See PAYMENT.DOC for details of the 
  56. payment.
  57.  
  58. If you received this software on a CD-ROM or from a disk vendor, you 
  59. have only paid for the disk. You do NOT have a license to use this 
  60. software.
  61.  
  62. Everybody has the right to copy and distribute this software as long as
  63. it is unmodified and all the original files listed in chapter 4 of this 
  64. document are included. A fee of at most $7 may be charged for the total 
  65. expences of copying. If a copying fee is taken, the receiver of this 
  66. software must be made aware that he has only the evaluation and copying 
  67. license stated above.
  68.  
  69. Remember that you may COPY THIS TO YOUR FRIENDS! This is the idea behind 
  70. shareware. Show this to your boss also (not meaning: if you do not count 
  71. him/her to your friends <g>). SRDISK can prove worth a few megabytes of 
  72. memory to you.
  73.  
  74.  
  75.  
  76.                           3. FEATURES INCLUDED
  77.  
  78. This RAM disk currently supports the following features:
  79.  
  80.   * Compatible with MS-DOS versions from 3.00 to 6.x and DR-DOS 5 to 6.
  81.   * XMS - Extended memory on 286 and up with HIMEM or other XMS 2.0
  82.     driver.
  83.   * EMS - Expanded memory of LIM/EMS version 3.2 and 4.0.
  84.   * Device drivers may be chained to form larger disks using many
  85.     different kind memories.
  86.   * Resizeable - can preserve disk contents if new format has room 
  87.     enough.
  88.   * Removable. Can be disabled without reboot.
  89.   * Supports 32-bit sector addressing introduced in DOS 4. Thus over 32M
  90.     RAM disks are possible. (Up to 63M disks tested.)
  91.   * Configurable
  92.       - sector size
  93.       - cluster size
  94.       - root directory entry count
  95.       - number of FATs
  96.   * Predefined DOS and FDFORMAT floppy disk look-alike formats.
  97.   * DISKCOPY compatible with DOS versions from 3.20 up. You can copy
  98.     to/from SRDISK drive using DOS DISKCOPY.
  99.   * Write protection.
  100.   * Can optionally set environment variables SRDISKn (n=1,2,...) to
  101.     the installed SRDISK drive letters.
  102.   * Comes with a dummy drive you can use to locate SRDISK (or any other 
  103.     installable) drive at a higher letter.
  104.  
  105. I have a list of new features to implement in the future. By sending 
  106. money and feature suggestions you can help me make this program still 
  107. better.
  108.  
  109. Users may find that the ability to resize is invaluable. Since some 
  110. programs can take best use of memory by directly using it while others 
  111. need a fast disk for temporary files, you can now have optimal 
  112. performance with both kinds of programs without the trouble of changing 
  113. configuration and rebooting.
  114.  
  115. The feature of being able to resize automagically when there is need for 
  116. it is currently not in my reach. FAT filesystem in DOS just was not 
  117. designed for it. There is some more explanation about it later in this 
  118. document.
  119.  
  120.  
  121.  
  122.                         4. FILES IN THIS RELEASE
  123.  
  124. The following files are distributed in this release:
  125.  
  126.         READ.ME         some notes
  127.         SRDISK.DOC      this document
  128.         SRDXMS.SYS      device driver for XMS memory
  129.         SRDXMSS.SYS     device driver for XMS memory (small version)
  130.         SRDEMS.SYS      device driver for EMS 4.0 memory
  131.         SRDEMSS.SYS     device driver for EMS 4.0 memory (small version)
  132.         SRDEMS3.SYS     device driver for EMS 3.2 memory
  133.         SRDUMMY.SYS     device driver for nothing but use drive letters
  134.         SRDISK.EXE      formatter program
  135.         PAYMENT.DOC     registering information
  136.         WHATSNEW.DOC    what is new in this release and history
  137.         FILE_ID.DIZ     short description of packet for BBS operators
  138.  
  139. The small versions of device drivers do not support DOS DISKCOPY 
  140. compatibility and may require user to make sure there is enough stack 
  141. available by specifying STACKS=8,512 (or similar) in CONFIG.SYS. Also, 
  142. you can not chain another device driver after a small version device 
  143. driver.
  144.  
  145.  
  146.  
  147.                                 5. USAGE
  148.  
  149. The SRDISK is basicly split into two parts:
  150.  
  151.         1) a device driver to add the virtual drive into DOS and
  152.         2) a program to control the device driver
  153.  
  154. The following explains the installation and how to use both of these
  155. parts.
  156.  
  157.  
  158.                         5.1. BASIC INSTALLATION
  159.  
  160. The basic installation for XMS memory can be done following these steps:
  161.  
  162. 1. Copy SRDXMS.SYS into you root directory.
  163.  
  164. 2. Copy SRDISK.EXE into some directory in your PATH.
  165.  
  166. 3. Make sure you have HIMEM.SYS or some other XMS driver installed
  167.    in CONFIG.SYS before the following step.
  168.  
  169. 4. Add into your CONFIG.SYS line
  170.  
  171.         DEVICE=SRDXMS.SYS
  172.  
  173. 5. Add into your AUTOEXEC.BAT after the PATH command line
  174.  
  175.         SRDISK <size>
  176.  
  177. The <size> defines the disk size in Kbytes.
  178.  
  179. If you have EMS memory, then use file SRDEMS.SYS in place of SRDXMS.SYS 
  180. and make sure EMS 4.0 device driver is installed in CONFIG.SYS before 
  181. the SRDEMS.SYS.
  182.  
  183. The device driver adds into DOS a new disk drive. Before you run
  184. SRDISK.EXE or when you set the disk size to zero, the new disk drive
  185. behaves as if you have a floppy drive without a floppy inserted.
  186.  
  187.  
  188.                        5.2. SRDISK DEVICE DRIVER
  189.  
  190. For a RAM disk you need a device driver. This device driver supplies a 
  191. storage for an array of sectors which DOS uses to store all the data. 
  192. SRDISK comes with separate drivers for storing the sectors in XMS 
  193. (extended memory managed by HIMEM.SYS or other XMS driver) and in EMS 
  194. memory.
  195.  
  196. Most often you do not need any parameters for the device drivers, but 
  197. the driver accepts two parameters:
  198.  
  199.         DEVICE=SRDmmm.SYS [d:] [/A]
  200.  
  201. The [] around the parameter mean it is optional; you must not type the
  202. brackets.
  203.  
  204. d:      The 'd:' can be used to tell the driver at what letter it is 
  205.         assigned in case DOS does not let it know it.
  206.  
  207.         Another use for 'd:' is to define into what SRDISK drive the 
  208.         current driver is to be appended.
  209.  
  210.         If you need to have SRDISK at some specific drive letter, you 
  211.         can use SRDUMMY.SYS. Note though, that drive letters are always 
  212.         used in order from A to Z and you can only use up a few drives 
  213.         before the letter you want to use.
  214.  
  215. /A      This tells the driver to append itself to the previously 
  216.         installed SRDISK device driver. The memory accessed using this 
  217.         driver is then available as extra memory to the previously 
  218.         installed SRDISK drive.
  219.  
  220.         If you want the low part of your disk to use XMS and the high 
  221.         part EMS memory, you can put these two lines into your 
  222.         CONFIG.SYS
  223.  
  224.                 DEVICE=SRDXMS.SYS
  225.                 DEVICE=SRDEMS.SYS /A
  226.  
  227.         For this to work, the first device driver must have the extra 
  228.         code to look into the next driver for more memory. Therefore the 
  229.         first device driver must not be the small version SRDXMSS.SYS or 
  230.         SRDEMSS.SYS.
  231.  
  232. Merely installing the driver gives you no RAM disk. It is as if you had 
  233. installed a floppy drive without putting a disk in the drive. For that 
  234. you need the SRDISK.EXE program.
  235.  
  236. The following chapters give some explanation about the different memory 
  237. types and explains reasons for the problems there are.
  238.  
  239.  
  240.                     5.2.1. XMS MEMORY DEVICE DRIVER
  241.  
  242. 8088 processor instruction set can only access memory at addresses from 
  243. 0 to 1048575 (1 megabyte) and memory above the address 1048575 is called 
  244. extended memory. i80286 had a new mode (protected mode) where the 
  245. instructions had a little different meanings and could be used to 
  246. address memory above the 1 megabyte limit.
  247.  
  248. XMS (eXtended Memory Specification) is a means to control the usage of 
  249. extended memory between applications so that each application can have 
  250. exclusive access to some range of addresses without fear the other 
  251. application would be using the same memory for its own purposes.
  252.  
  253. When SRDISK (or any other XMS client) needs extended memory, it requests 
  254. it from extended memory manager (EMM) that follows the eXtended Memory 
  255. Specification. Most common and free such memory manager is HIMEM.SYS.
  256.  
  257. The EMM then tries to find available memory block (a contiguous range of 
  258. addresses available) that is as large or larger than the requested 
  259. memory block. If all of the available blocks are smaller than the 
  260. requested size, the request fails even if the available blocks would be 
  261. large enough when combined.
  262.  
  263. Since DOS still runs in the 8088 mode where instructions can not address 
  264. memory beyond 1 megabyte limit, programs run in the same mode too. XMS 
  265. also defines service to copy memory to and from the memory beyond the 
  266. limit.
  267.  
  268.  
  269.                     5.2.2. EMS MEMORY DEVICE DRIVER
  270.  
  271. Since 8088 could only address memory up to 1 megabyte, any memory added 
  272. had to be made to use the same addresses with already existing memory. 
  273. Some new hardware had to be added so that the memory occupying a range 
  274. of addresses could be switched with another block of memory. 
  275. Lotus/Intel/MicroSoft Expanded Memory Specification (LIM EMS) was 
  276. developed to provide standardized access to this memory for much the 
  277. same reason XMS was developed to provide access to extended memory.
  278.  
  279. EMS uses a 64K memory area divided into four separate 16K windows to 
  280. access the expanded memory. These windows show different 16K blocks of 
  281. EMS memory (called pages) as requested by the application.
  282.  
  283. EMS memory can also be simulated very efficiently with 386 virtual 
  284. memory. For example EMM386 uses this method to convert extended memory 
  285. into expanded memory.
  286.  
  287. Since EMS memory is consisted of separate 16K pages, there is no 
  288. requirement to have the allocated memory be in contiguous blocks as with 
  289. XMS memory. Since all the available memory can be allocated, you can 
  290. better predict how much memory you can allocate.
  291.  
  292.  
  293.                     5.2.3. EMS 3.2 MEMORY DEVICE DRIVER
  294.  
  295. EMS 3.2 is an older version of EMS. 4.0 is the currently most used one.
  296.  
  297. The main reason SRDISK has version 3.2 driver is that MS-Windows 3.1 has 
  298. a serious bug in the EMS protection it uses. Basicly with the EMS 3.2 
  299. driver you can access EMS disk that has been allocated before starting 
  300. MS-Windows but not one that is allocated inside DOS window. With the EMS 
  301. 4.0 driver you can not access memory allocated before starting 
  302. MS-Windows but can well access memory that is allocated inside DOS 
  303. window.
  304.  
  305. In any case, MS-Windows will not allow any other process access the 
  306. disk allocated in another process.
  307.  
  308.  
  309.                        5.3. SRDUMMY DEVICE DRIVER
  310.  
  311. SRDUMMY.SYS can be used to force installable device drivers to some 
  312. specific drive letters. To give a better understand what for you might 
  313. need it, read the following paragraph.
  314.  
  315. DOS allocates drives in order from A to Z. The first drives A and B are 
  316. always used for floppy drives. If you have hard disks, drives from C up 
  317. are allocated to them by DOS before CONFIG.SYS is loaded. After all the 
  318. standard hardware drives have been assigned, DOS reads the CONFIG.SYS 
  319. and loads the devices found there. Each block device driver (a device 
  320. supplying only an array of blocks of data, like SRDISK) is assigned a 
  321. drive letter or more in the order they are in CONFIG.SYS. The device 
  322. drivers can not determine to which drives they get assigned.
  323.  
  324. SRDUMMY.SYS tells DOS it provides one or more block devices and thus 
  325. uses up some drive letters. There will not be any drives though, and if 
  326. you access the drives, you'll get the drive not ready error.
  327.  
  328. SRDUMMY.SYS takes one parameter: The drive letter the next block device 
  329. should be loaded to.
  330.  
  331. Take a look at the following sample CONFIG.SYS:
  332.  
  333.         DEVICE=SRDXMS.SYS
  334.         DEVICE=SRDUMMY.SYS G:
  335.         DEVICE=SRDEMS.SYS
  336.  
  337. If you have one hard disk, the floppies and hard disk use letters A-C. 
  338. SRDXMS.SYS is then loaded to D and SRDUMMY.SYS uses drives E and F.
  339. SRDEMS.SYS loads thus at G.
  340.  
  341. If you add a second hard drive, it will take drive letter D and 
  342. SRDXMS.SYS will then be at E and SRDUMMY.SYS use only drive F putting
  343. SRDEMS.SYS to G again.
  344.  
  345. If you add a few more drives so that drive G is already in use before 
  346. SRDUMMY.SYS gets loaded, you will only get a warning message from 
  347. SRDUMMY.SYS and the SRDEMS.SYS will load at the next available drive 
  348. letter.
  349.  
  350. DR-DOS 6 seems not to allow access to drive letters after P: even with 
  351. LASTDRIVE=Z statement in CONFIG.SYS. So with DR-DOS you must avoid using 
  352. the last drive letters after P:.
  353.  
  354.  
  355.                           5.4. SRDISK PROGRAM
  356.  
  357. The disk can be enabled by, for example, using command "SRDISK 1024"
  358. which will make first SRDISK a 1024K disk. It can be disabled by making
  359. it of size 0: "SRDISK 0".
  360.  
  361. You should include the command to enable the RAM disk into your
  362. AUTOEXEC.BAT file.
  363.  
  364. The SRDISK.EXE is self documented. You'll get the documentation by
  365. typing at the DOS prompt "SRDISK /?" and hitting enter. To get a hang of
  366. it better, some examples with explanations are given below.
  367.  
  368.  
  369.                      5.4.1. SRDISK SAMPLE COMMANDS
  370.  
  371. Command
  372.  
  373.         SRDISK 1024
  374.  
  375. creates or changes the old disk to a 1024K (= 1M) disk.
  376.  
  377. More precisely it calculates various disk parameters as it best sees fit
  378. for most users needs. Those disk parameters can be defined by user on
  379. the command line if the calculated values do not meet his needs. After
  380. the parameters have been calculated, the memory (1024K = 1M) needed for
  381. the disk is allocated and a disk image is created into the memory.
  382.  
  383. The calculated parameters include sector size, cluster size, number of
  384. FATs and root directory size.
  385.  
  386. - Sector is the basic unit of storage. It's size does not mean much, but
  387.   it has to be a power of 2 and no larger than 512 bytes.
  388.  
  389. - Cluster size tells in how large blocks the space is allocated. Larger
  390.   clusters mean smaller FAT (= File Allocation Table), but then even the
  391.   smallest file always takes at least that much space. Cluster can not
  392.   be smaller than one sector. A cluster is a collection of sectors.
  393.  
  394. - FAT is the table that holds information about each allocation unit,
  395.   cluster, on the disk. The information can be indication that the
  396.   cluster is free, or where the next cluster of the file is or that the
  397.   cluster is unusable. A disk only needs one FAT - though multiple
  398.   copies of it can be specified. Note that the other FATs are only
  399.   copies of the first one.
  400.  
  401. - Root directory is limited to hold only some predefined number of
  402.   files. If you get "Can not create file" errors while there is plenty
  403.   of free space on disk, you need to make the root directory larger.
  404.   Alternatively you should create a subdirectory and create the files
  405.   there. Subdirectories can be arbitrarily large.
  406.  
  407. If there is data on the disk to be preserved, sector and cluster size 
  408. are not changed.
  409.  
  410. Command
  411.  
  412.         SRDISK 1024 /O
  413.  
  414. does the same as the command 'SRDISK 1024' except the various disk
  415. parameters are not calculated but instead the old parameters are used.
  416.  
  417. Command
  418.  
  419.         SRDISK /F:1440
  420.  
  421. tries to create the disk to look like a real floppy disk. It also 
  422. defines some parameters that otherwise have no effect like media 
  423. descriptor, number of heads and sectors per track. These parameters have 
  424. no other function but to make it look like it is a real, physical disk - 
  425. which it is not. SRDISK drives are not accessible through BIOS, so some 
  426. diskcopy and utility programs can fail if used with SRDISK.
  427.  
  428. Command
  429.  
  430.         SRDISK /S:256 /C:1024 /D:64
  431.  
  432. reformats the disk. The size is determined by the old size of the disk
  433. even without the use of /O. Sector size is changed to 256 bytes, cluster
  434. size to 1024 bytes (two sectors) and root directory will hold 64 entries
  435. (one of which is used for the volume label).
  436.  
  437. Command
  438.  
  439.         SRDISK /U
  440.  
  441. clears the disk. It recalculates the format and makes it better if 
  442. possible, but preserves the disk size. Without this switch, the disk 
  443. contents are preserved if possible. This is also usefull if you can not 
  444. resize the disk because of errors on it -- using this option the errors 
  445. will be ignored and the disk is made whole new.
  446.  
  447. Command
  448.  
  449.         SRDISK E:
  450.  
  451. tests if E is a SRDISK RAMdisk and, as no format is defined, display
  452. it's current configuration. The letter may not correspond to the letter
  453. known by DOS for the drive if the letter is defined wrong when
  454. installing the SRDISK.SYS device driver in CONFIG.SYS.
  455.  
  456. Command
  457.  
  458.         SRDISK
  459.  
  460. without the drive letter specified tries to determine the drive by first
  461. trying the current drive and if it is not a SRDISK drive, then the first
  462. SRDISK drive loaded in CONFIG.SYS. As no change in the format is
  463. defined, the current configuration of the found drive are displayed.
  464.  
  465.  
  466.                    5.4.2. SRDISK COMMAND LINE OPTIONS
  467.  
  468. To ease remembering the command line options, SRDISK has for some 
  469. settings several different options. Many of the options are long, but 
  470. you can truncate them if you write enough for SRDISK to identify the 
  471. option unambiguously.
  472.  
  473. An exact match in the full lenght of the option is always identified 
  474. instead of some another option that begins with the same characters.
  475.  
  476. All numeric parameters for the options are translated using the C 
  477. language rules: Number starting with 0 is octal number (base eight) and 
  478. with 0x is hexadecimal (base 16), others are decimal.
  479.  
  480. The options in alphabetical order are
  481.  
  482.   /?               List of most important command line options
  483.   /A:n             Number of FAT copies (1 or 2)
  484.   /ASK             Ask for confirmation if data would be lost
  485.   /AVAILABLE:n     Resize to disk to have n Kbytes of space available
  486.   /C:n             Cluster size
  487.   /CLUSTER:n       Same as /C
  488.   /D:n             Dir entries
  489.   /DEVICETYPE:n    Device type for DISKCOPY compatibility
  490.   /DIRENTRIES:n    Same as /D
  491.   /DOSFORMAT:n     DOS or FDFORMAT lookalike format
  492.   /E               Set environment variables SRDISKn
  493.   /ENVIRONMENT     Same as /E
  494.   /ERASE           Clear disk contents
  495.   /F:n             Same as /DOSFORMAT
  496.   /FATS:n          Same as /A
  497.   /FILESPACE:n     Make the disk have n Kbytes space for files
  498.   /FORCE           Destroy data if necessary to force new format
  499.   /FREEMEM:n       Determine disk size to leave at least n Kbytes mem free
  500.   /H               Same as /?
  501.   /HEADS:n         Number of heads for DISKCOPY compatibility
  502.   /HELP            Same as /?
  503.   /M:n[:n...]      Max sizes for different drivers chained to a drive
  504.   /MAXSIZE         Allocate the disk as large as it can safely be allocated
  505.   /MEDIA:n         Media ID byte for DISKCOPY compatibility
  506.   /MINSIZE         Alias to /AVAILABLE:0, minimize the disk
  507.   /NO              NO, do not destroy data to complete new format
  508.   /O               Use old disk format where not redefined
  509.   /OLD             Same as /O
  510.   /REGISTER        Display registration information
  511.   /S:n             Sector size (128, 256 or 512 bytes)
  512.   /SECTORS:n       Number of sectors per track
  513.   /SECTORSIZE:n    Same as /S
  514.   /SIDES:n         Same as /HEADS
  515.   /SPT:n           Same as /SECTORS
  516.   /U               Same as /ERASE, FORMAT compatible
  517.   /UNCONDITIONAL   Same as /ERASE
  518.   /V:n             Verbose level (1-5) to control amount of output
  519.   /VERBOSE:n       Same as /V
  520.   /W:x             Write protection x is ON/+ or OFF/-
  521.   /WRITEPROTECT:x  Same as /W
  522.   /Y               Same as /FORCE
  523.   /YES             Same as /FORCE
  524.  
  525. The options by function
  526.  
  527.   /? /H /HELP
  528.  
  529.         List the most important command line options and exit.
  530.  
  531.   /A:n /FATS:n
  532.  
  533.         Number of FAT copies (1 or 2). You need only one FAT unless you 
  534.         need to make the disk look like some floppy disk.
  535.  
  536.   /AVAILABLE:n /MINSIZE
  537.  
  538.         Space available on the disk. The disk size will be counted to be 
  539.         large enough to hold the files already on it and to have n 
  540.         Kbytes of space available.
  541.  
  542.         /MINSIZE is the same as /AVAILABLE:0 and will also make the root 
  543.         directory smaller.
  544.  
  545.   /C:n /CLUSTER:n
  546.  
  547.         Cluster size. Cluster is the unit used to allocate disk space.
  548.         This option has effect on the space used for File Allocation 
  549.         Table. If cluster size is small, bigger FAT is needed and there 
  550.         is less room for files, but files may take more room.
  551.  
  552.   /D:n /DIRENTRIES:n
  553.  
  554.         Root directory entries. FAT file system has fixed size root 
  555.         directory. You can specify the size for it using this option.
  556.  
  557.         Note that each entry is 32 bytes long and a fixed amount of 
  558.         sectors are used to hold the entries. Thus if sector size is 512 
  559.         bytes each sector can hold 16 entries (512 / 32 = 16) and 
  560.         specifying /D:4 or /D:16 uses exactly the same amount of space 
  561.         on the disk: one sector.
  562.  
  563.         If there is nothing against it, I start to round the number of 
  564.         root directory entries up to fill the last root directory 
  565.         sector. Some utility programs can be confused if the last sector 
  566.         is only partially used.
  567.  
  568.   /DEVICETYPE:n
  569.  
  570.         DOS does not care what type the device is, but in case some 
  571.         utility program asks DOS for the type it can be specified with 
  572.         this switch. This is normally set correctly if you use the /F 
  573.         switch. Device types are
  574.  
  575.                 0 = 360K
  576.                 1 = 1.2M
  577.                 2 = 720K
  578.                 3 = 8-inch single-density
  579.                 4 = 8-inch double-density
  580.                 5 = Hard disk
  581.                 6 = Tape drive
  582.                 7 = 1.44M
  583.                 8 = Read/Write optical
  584.                 9 = 2.88M
  585.  
  586.   /E /ENVIRONMENT
  587.  
  588.         Set environment variables SRDISK1, SRDISK2 etc. to the drive 
  589.         letters or SRDISK drives installed. You can then use the 
  590.         variables in batch files to access the RAM disk.
  591.  
  592.         For example:
  593.  
  594.                 REM Set environment varsiables without much output and
  595.                 REM make a tiny disk at the same time
  596.                 SRDISK /E /V:1 /F:1
  597.                 SET TMP=%SRDISK1%:\TMP
  598.                 MKDIR %TMP%
  599.  
  600.                 IF "%SRDISK2%" == "" ECHO You have only one SRDISK drive
  601.  
  602.   /F:n /DOSFORMAT:n
  603.  
  604.         DOS or FDFORMAT lookalike formats. The number n defines the disk 
  605.         size in Kbytes. This option also sets all the other parameters 
  606.         besides the size to match the corresponding DOS or FDFORMAT 
  607.         created floppy disk.
  608.  
  609.         The currently supported formats are
  610.  
  611.           Size Media Device SPT Sides
  612.  
  613.            160  FE     360   8   1    DOS
  614.            180  FC     360   9   1    DOS
  615.            200  FD     360  10   1    FDFORMAT
  616.            205  FD     360  10   1    FDFORMAT
  617.            320  FF     360   8   2    DOS
  618.            360  FD     360   9   2    DOS
  619.            400  FD     360  10   2    FDFORMAT
  620.            410  FD     360  10   2    FDFORMAT
  621.            640  FB     720   8   2    DOS
  622.            720  F9     720   9   2    DOS
  623.            800  F9     720  10   2    FDFORMAT
  624.            820  F9     720  10   2    FDFORMAT
  625.           1200  F0     1.2  15   2    DOS
  626.           1440  F0    1.44  18   2    DOS
  627.           1476  F0    1.44  18   2    FDFORMAT
  628.           1600  F0    1.44  20   2    FDFORMAT
  629.           1640  F0    1.44  20   2    FDFORMAT
  630.           1680  F0    1.44  21   2    FDFORMAT
  631.           1722  F0    1.44  21   2    FDFORMAT
  632.  
  633.         In addition to these there is a special format 1 to make a mini 
  634.         disk. This can be used if you have your RAM disk in your PATH 
  635.         and do not want to get Drive Not Ready errors when you have 
  636.         freed the memory for RAM disk. Check your memory manager though: 
  637.         some memory managers allocate memory in 16K chunks and a 1K disk 
  638.         uses as much memory as a 16K disk does.
  639.  
  640.   /FILESPACE:n
  641.  
  642.         Space available for files. The disk will be larger than n 
  643.         Kbytes, since file allocation table and root directory always 
  644.         take some space too.
  645.  
  646.         Note that files usually take some extra space because the space 
  647.         for them is allocated in clusters. For example, if cluster size 
  648.         is 1024 bytes (1K), any file this long or smaller (but not 0 
  649.         bytes) will use one cluster and thus 1024 bytes.
  650.  
  651.         Subdirectories also use file space.
  652.  
  653.   /FREEMEM:n /MAXSIZE
  654.  
  655.         Memory available for other programs. The disk will be sized to 
  656.         leave at least n Kbytes of memory to other programs. The disk 
  657.         size may be less than necessary if there is some uncertainty 
  658.         whether or not all the memory can be allocated.
  659.  
  660.         FOR XMS MEMORY, THIS CAN ALLOCATE LESS THAN THERE IS AVAILABLE 
  661.         SINCE XMS CAN NOT RELIABLY PUT ALL FREE MEMORY IN ONE BLOCK.
  662.  
  663.         The disk can also be disabled if more free memory is requested 
  664.         than there is available.
  665.  
  666.         /MAXSIZE is same as /FREEMEM:0, thus using all safely available 
  667.         memory for the disk.
  668.  
  669.         If some program of yours needs free memory and you do not care 
  670.         for disk contents, you can put for example
  671.  
  672.                 SRDISK /FREEMEM:1024 /YES
  673.  
  674.         into a batch file to start to program. The /YES gives permission 
  675.         to clear the disk if the disk can not be made small enough 
  676.         otherwise.
  677.  
  678.   /HEADS:n /SIDES:n
  679.  
  680.         Number of heads for DISKCOPY compatibility. This is normally set 
  681.         correctly if you use the /F switch.
  682.  
  683.   /M:n[:n...]
  684.  
  685.         Max sizes for different drivers chained to a drive.
  686.  
  687.         Normally SRDISK uses as much space as is available on the first 
  688.         driver and only then starts allocating on the second one. If you 
  689.         want to use only up to some amount of memory on the different 
  690.         drivers chained to one drive, you can define the amounts with 
  691.         this option.
  692.  
  693.         For example to define first driver use only 100K of memory, give 
  694.         command
  695.  
  696.                 SRDISK /M:100
  697.  
  698.         If you would have three or more drivers chained into one drive, 
  699.         you could define first and third to use 100K and let the other 
  700.         drivers use as much as they were allowed to use before with 
  701.         command
  702.  
  703.                 SRDISK /M:100::100
  704.  
  705.         [The /MAXSIZES option may be removed in future versions because 
  706.         it conflicts with /MAXSIZE I plan to implement. /MAXSIZE will be
  707.         the opposite of /MINSIZE.]
  708.  
  709.   /MEDIA:n
  710.  
  711.         Media ID byte for DISKCOPY compatibility. This is normally set 
  712.         correctly if you use the /F switch.
  713.  
  714.         Use Media IDs in the range from 0xF0 to 0xFF. Smaller values 
  715.         make CHKDSK report that it is possibly non-DOS format media.
  716.  
  717.   /O /OLD
  718.  
  719.         Use old disk format where not explicitly redefined with command
  720.         line options.
  721.  
  722.   /REGISTER
  723.  
  724.         Displays the registration information.
  725.  
  726.   /S:n /SECTORSIZE:n
  727.  
  728.         Sector size (128, 256 or 512 bytes). Sector is the basic 
  729.         allocation unit of a disk. Smaller sector size can decrease the 
  730.         amount of memory wasted on boot sector, FAT and root directory, 
  731.         but that is just about the only benefit of it. Clusters are 
  732.         formed of sectors, so sector size can not be larger than cluster 
  733.         size. DOS uses by default 512 bytes per sectors.
  734.  
  735.   /SECTORS:n /SPT:n
  736.  
  737.         Number of sectors per track for DISKCOPY compatibility. This is 
  738.         normally set correctly if you use the /F switch.
  739.  
  740.   /U /UNCONDITIONAL /ERASE
  741.  
  742.         Clear disk contents. This implies option /YES.
  743.  
  744.         If your disk gets corrupted and SRDISK refuces to reformat it, 
  745.         try this switch. SRDISK should not then care about the current 
  746.         disk, but rather just wipes it off and creates a new one.
  747.  
  748.   /V:n /VERBOSE:n
  749.  
  750.         Verbose level (1-5) to control amount of output. With /V:1 you 
  751.         can limit the output to the title.
  752.  
  753.   /W:x /WRITEPROTECT:x
  754.  
  755.         Write protection contol. The parameter x can be ON, + or nothing 
  756.         to enable the write protection or OFF or - to disable it.
  757.  
  758.   /Y /YES /FORCE
  759.   /NO
  760.   /ASK
  761.  
  762.         These are to control the need of user intervention.
  763.  
  764.         All questions in SRDISK are formed so that answer YES will give 
  765.         permission to destroy data and continue, while NO will abort the 
  766.         operation and try to preserve the data on the disk. By these 
  767.         options you can give the answer on the command line.
  768.  
  769.         /ASK is the default and means the user will be prompted to make 
  770.         choise.
  771.  
  772.  
  773.  
  774.                            6. TROUBLESHOOTING
  775.  
  776. Causes of grief
  777.  
  778. 1. RAM disks loose their contents when power is turned off! Do not store
  779. anything valuable there.
  780.  
  781. 2. There is no XMS nor EMS memory without a proper device driver. 
  782. HIMEM.SYS will do for XMS. For EMS you need to install the device driver 
  783. that came with your expanded memory hardware. QEMM can supply both on 
  784. 386 or better hardware and you might be better off using the SRDEMS 
  785. driver with it.
  786.  
  787. 3. Not all HIMEM.SYS support memory above 16M limit. HIMEM.SYS versions
  788. 2.78 and later should be good.
  789.  
  790. 4. DR-DOS 5 HIDOS.SYS does not implement the XMS resize function. 
  791. Therefore SRDISK may not be able to resize the disk unless you replace 
  792. the HIDOS.SYS with HIMEM.SYS.
  793.  
  794. 5. Some programs swap themselves for a shell to the ramdisk. If you
  795. change the format of the disk or clear the disk from such program, the
  796. swapped program may not be able to recover and can crash your computer.
  797.  
  798. 6. Some disk caching programs are reported to cache SRDISK too! This can 
  799. cause a system crash and caching a RAM disk is anyway useless. If you 
  800. use a disk cache, please load it after SRDxxx.SYS or tell it explicitly 
  801. not to cache the SRDISK drive.
  802.  
  803. 7. SRDISK needs it's XMS memory in one contiguous area. Therefore if
  804. SRDISK complaints about insufficient memory while you have plenty of it 
  805. free, the reason might be that some other program uses a piece of the
  806. memory in the middle of the available memory. If you have a choise, use 
  807. EMS since it does not (usually) have this problem.
  808.  
  809. 8. There can be problems with XMS memory when not enough of it can be
  810. allocated. This may result in lost disk contents. Also some memory 
  811. managers that provide both XMS and EMS (like QEMM and the EMM386.EXE of 
  812. MS-DOS 6) can fool SRDISK to think there is more memory available than 
  813. there really is if SRDISK uses both XMS and EMS memory for the disk.
  814.  
  815. 9. Some multitasking environments (like MS-Windows) can free the memory 
  816. allocated under them to the RAM disk. This will cause the data to be 
  817. lost and errors in programs that try to access the disk.
  818.  
  819. 10. MS-Windows has buggy memory protection that prevents programs from 
  820. accessing memory allocated in another session. It also prevents using 
  821. EMS memory allocated for the SRDEMS.SYS driver outside Windows and for 
  822. the SRDEMS3.SYS driver inside Windows. In general you may find it better 
  823. to use SRDEMS3.SYS or SRDXMS.SYS and allocate any disk you will use 
  824. before starting Windows and never resize any disk while inside Windows.
  825.  
  826.  
  827.  
  828.                              7. TRADEMARKS
  829.  
  830. Oh, and we should not forget these (I can not verify they are correct, 
  831. but still):
  832.  
  833. QEMM is a trademark of Quartedreck Office Systems Inc.
  834. Microsoft, MS-DOS, SmartDrive and Windows are trademarks of Microsoft 
  835. Corporation. DR-DOS is a trademark of Digital Research Inc. Intel is a 
  836. trademark of Intel Corporation. Lotus is trademark of Lotus Development 
  837. Corporation.
  838.  
  839. FDFORMAT is copyrighted by (and trademark of?) Christoph H. Hockstätter, 
  840. Germany. Nice work.
  841.  
  842. SRDISK is my trademark.
  843.  
  844. If any mentioned trademarks are not included in this list, please tell 
  845. me about them. They are anyway hereby acknowledged.
  846.  
  847.  
  848.  
  849.                              8. LAST WORDS
  850.  
  851. Please, if you know of a way to get around the Windows 3.1 memory 
  852. protection, let me know about it.
  853.  
  854. You can contact me by sending E-mail from
  855.  
  856.         Internet to `Marko.Kohtala@compart.fi'
  857.         CompuServe to `>INTERNET:Marko.Kohtala@compart.fi'
  858.  
  859. If the above address fails, I can still be reached at 
  860. `Marko.Kohtala@hut.fi'.
  861.  
  862. My surface mail address is
  863.  
  864.         Marko Kohtala
  865.         PL 115
  866.         SF-01451 Vantaa
  867.         FINLAND
  868.  
  869. You can also call Airline BBS, 24H, HST, V.32, V.42, MNP, +358-0-8725380 
  870. and leave mail at the PRIV area to me, Marko Kohtala (sorry, no 
  871. netmail there). You can also always get the latest release of SRDISK 
  872. from there.
  873.  
  874. If you have access to Fidonet, Bitnet, UUCP mail or just about any 
  875. network, ask your system operator if you can mail to Internet.
  876.  
  877. You can find the latest release of SRDISK in United States, Illinois at
  878.  
  879.         The Midrange System BBS
  880.         Sysop: David Gibbs
  881.         FidoNet: 1:115/439
  882.         Phones: 708-776-1062 and 708-776-1063, both have HST and V.32
  883.         Using Remote Access
  884.  
  885. You can file request latest version using magic file name SRDISK.
  886.  
  887.